Part Number Hot Search : 
LF152EDI 332V12JT MLX10801 AT89C5 CQP432 103ML ENA1028A 4D561K
Product Description
Full Text Search
 

To Download TRW-900C Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 1 wenshing ?? t rw - 900c rf module series wireless low cost 900mhz rf transceiver module version history version date changes v1.01 jun. 1 2 , 2007 1 st. edition v1.02 aug.20 , 2007 2 nd. edition v1.03 mar.15 , 20 08 3 rd. edition v1.04 apr.20 , 2008 4 th. edition v1.05 jun. 18 ,2008 5 th. edition specification ? remote control systems ? wireless data transceiver ? 300m hz~ 928m hz ism/srd band ? remote metering ? wireless security systems ? automatic meter reading ? application ra nge : remote metering wireless security systems automatic meter reading home automation
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 2 application the rf transceiver is integrated with a highly configurable baseband modem. the modem supports various modulation formats and has a configurable d ata rate up to 250 k bps. the communication range can be increased by enabling a forward error correction option, which is integrated in the modem. trw - 900c provides extensive hardware support for packet handling, data buffering, burst transmissions, cle ar channel assessment, link quality indication and wake - on - radio. the main operating parameters and the 64 - byte transmit/receive fifos of trw - 900c can be controlled via an spi interface. in a typical system, the trw - 900c will be used together with a micro controller and a few additional passive components. key feature ? small size ? separate 64 - byte rx and tx data fifos ? efficient spi interface: all registers can be programmed with one "burst" transfer ? programmable output power up to + 10 dbm ? high sensitivity ( - 1 11 dbm at 1 .2 k bps, 1% packet error rate) absolute maximum rating parameter min max unit condition/note supply v oltage 2.7v 3.3v v voltage on a ny d igital p in - 0.3 vdd+0.3 v input rf l evel +10 dbm storage t emperature r ange - 50 150 esd <500 v according to jedec std 22, method a114, human body model
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 3 general characteristic and electrical specification parameter min typ e max unit condition/note frequency r ange 3 00 928 mhz data r ate 1.2 250 k bps power d own m odes 400 na v oltage regulator to digital part off, register values retained ( sleep state) current c onsumption, rx 1 6 ma current c onsumption, tx 30 ma transmit mode, +1 0 dbm output power receiver s ensitivity 1.2k data rate - 1 11 dbm transmit o utput p ower +1 0 db m transmit mode pin assignment no. name type description 1 dr output normal state is 0. when it is 1, it expresses rf are sending or receiving data. 2 cs i nput low level is effective and it is selection module. 3 miso o utput the data which i s read from module includes data and configuration information . 4 sclk output it provides clock for rf read and write. 5 mosi output the data which is written includes data and configuration information . 6,9,10 vdd power c athode . 7,8 gnd power neg ative .
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 4 timing note data sending way of trw - 900c is taking spi. when you want to send, please add the address, and the address is the direction of bit7. when it is 0, it is under writing information. when it is 1, it is under reading data, and purpose of reading on configuration is in order to verify the correctness of writing. 1. configuration timing description: format: address + data 2. data sending/ receive timing description: its timing is the same as configuration and reading the written address is with different information. sending format: 0 x7f + n of b yte (n <65) receiving format: 0xff+ n of b yte n<61 3. 0xff+n of byte n<61 , maximum byte to write the information to the rf is 64 one time. read out bits of information received and the address is 0xff. maximum reading byte number is 64 one time. fsclk < 6.5mhz t1 > 200us t2 > 50ns t3 > 50ns t4 > 80ns t5 > 20ns t6 > 20ns
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 5 order value description order value function d escription 0x30 reset rf module 0x32 close osc of rf 0x33 automatically locked, and time is less than 1 ms . 0x34 clean reception buffer zone. 0x35 clean sending buffer zone. 0x36 module is into statistic mode. 0x39 module is into low consumption mode. 0x3a module is into receiving mode. 0x3b module is into sending mode. 0x7e transmission power set mode. 0x7f/0xff writing sending/readi ng receiving buffer zone register not e address 1.2k 2.4k 4.8k 10k 38.4 76.8 100 250k function note fsk fsk fsk fsk fsk fsk fsk msk modulation method. 0x0d 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e trw - 900c set up the fundamental frequency, and it is w ork - for - 868 mhz. 0x0e 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0x0f 0xec 0xec 0xec 0xec 0xec 0xec 0xec 0xec 0x13 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 13h[6:4] is the number of leader. 0x14 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 13h[1:0]14h is the fundamental frequency spacing. 0x0a 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 to set the channel. 0x0b 0x08 0x08 0x06 0x06 0x06 0x06 0x06 0x0b 0bh[3:0]if setting. 0x0c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 constant.
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 6 0x10 0xf5 0xf6 0xc7 0xc8 0xca 0x7b 0x5b 0x2d receive bandwidth set m odule rate set 0x11 0x83 0x83 0x83 0x93 0x83 0x83 0xf3 0x3b 0x12 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x73 12h[7:4] modulation choice way. 0x15 0x15 0x15 0x15 0x34 0x34 0x42 0x47 0x00 modulation setting. 0x22 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 the corresponding number of fixed rates are as follows. when frequency is less t hen 430.5mhz, the value of 0x0a. 0x21 0x56 0x56 0x56 0x56 0x56 0xb6 0xb6 0xb6 0x18 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x19 0x16 0x 16 0x16 0x16 0x16 0x1d 0x1d 0x1d 0x1a 0x6c 0x6c 0x6c 0x6c 0x6c 0x1c 0x1c 0x1c 0x1b 0x03 0x03 0x43 0x43 0x43 0xc7 0xc7 0xc7 0x1c 0x40 0x40 0x40 0x40 0x40 0x00 0x00 0x00 0x1d 0x91 0x91 0x91 0x91 0x91 0xb2 0xb2 0xb2 0x23 0xa9 0xa9 0xa9 0xa9 0xa9 0xe a 0xea 0xea 0x24 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x25 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x26 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x29 0x59 0x59 0x59 0x59 0x59 0x59 0x59 0x59 0x2c 0x81 0x81 0x81 0x81 0x81 0x88 0x88 0x88 0x2d 0x 35 0x35 0x35 0x35 0x35 0x31 0x31 0x31 0x2e 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x08 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 packet control. 0x02 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 constant 0x00 0x06 0x06 0x06 0x1b 0x1b 0x1b 0x1b 0x1b 0x0 6 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff packet length setting and value is 0xff when it is variable t h is is table is based on fundamental frequency on 868mhz, frequency spacing is 250k freq[23:0] = fcarrier*2^16/26000000 ex 1 frequency is 868m hz freq[23:0] = 868000000*2^16/26000000 = 2187894
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 7 = 0x216276 and 0dh = 0x21 0eh = 0x62 0fh = 0x76 ex 2: frequency is 878.5m hz freq[23 :0] = 878500000*2^16/26000000 = 2214360 = 0x21c9d8 and 0dh = 0x21 0eh = 0xc9 0fh = 0xd8 2. frequency space setting between the channel: 13h[1:0]14h f channel = 26000000*(256+11h[7:0])*2^10[1:0]/2^18 if you want set the frequency space of chan nel to 250k, the 14 = 0x3b,13[1:0] =3 3. selection of channel space: 0x0a f carrier = f base +f channel *0ah[7:0] if fundamental frequency is 800m hz f channe = 250k 0x0a=00 frequency will be 800m hz if fundamental frequency is 800mhz f channe = 250k 0x0a=04 frequency will be 801m hz 4. leader code setting 13h[6:4] = 0 is the second byte leader code. 13h[6:4] = 1 is the third byte leader code. 13h[6:4] = 2 is the forth byte leader code. 13h[6:4] = 3 is the sixth byte leader code . 13h[6:4] = 4 is the eighth leader code 13h[6:4] = 5 is the twelve byte leader code 13h[6:4] = 6 is the sixteenth byte leader code. 13h[6:4] = 7 t 24 b yte ? is the twenty - forth byte leader code. 5. re ception bandwidth setting 10h[7:4] = 00 812k 10h[7:4] = 01 625k 10h[7:4] = 02 541k 10h[7:4] = 03 464k 10h[7:4] = 04 406k 10h[7:4] = 05 325k 10h[7:4] = 06 270k 10h[7:4] = 07 232k 10h[7:4] = 08 203k 10h[ 7:4] = 09 162k 10h[7:4] = 10 135k 10h[7:4] = 11 116k 10h[7:4] = 12 102k 10h[7:4] = 13 81k 10h[7:4] = 14 68k 10h[7:4] = 15 58k 6. if frequency setting if = 25390.625*0bh[3:0] ex: 2.4k working rate, 0bh[3:0]=8, and f if = 203.125khz 7. rate setting: 10h[3:0] rate = (256+11h[7:0])*2^10h[3:0]*26000000/2^28 ex: rate is 2.4k and 11h = 0x83,10h[3:0] = 0xx6 ex: rate is 1.2k and 11h = 0x83,10h[3:0] = 0xx5 8. modulation : 12h[7:4]
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 8 12h[7:4] = 0 it expresses selected 2 - fsk mode. 12h[7:4] = 1 it expresses selected msk mode. 9. modulation set: 15h a. value will be 1 on msk. b. modulation formula is as below when it is on 2 - fsk and try to find the nearest value. f dev = 8+15h[2:0]*2^15h[6:4]*198 10. packet control 08h 08h = 0x04 the packet length is fixed, the value of its length is in the 06 h. ex: when the 06 h in the value of 0 x70, packet in the launchi ng and receiving is for 112 byte . during transmit and receive, it need to subparagraph send and receive, and just can finish data receiving . transmit format: 0 x7f + n - byte (n = 06h in value) 08h = 0x05 the length of the packet is variable, and the length of the value of transmitting is the first byte information, 06h is in the value of 0 xff. transmit format: 0 x7f + n - byte (n = packet length) remark: a. w hen the state of the transmitted, if the packet length is less or equal to 64 , the information can written into trw - 900c module . if the length of packet is over 64 , you can write the data into trw - 9064 for one time only and paragraph to send the data to trw - 900c because trw - 900c only has one 64 bytes buffer zone. paragraph way is as below: 10.1.1 write 64 bytes to trw - 900c at first time. 10.1.2 wait for dr become to high. 10.1.3 read 0 x fa value. if the value is 0x10, it is express there are still 16 bytes is not finish sending on buffer zone. if the va lue is 0x20, it is expresses there are 32 bytes still not finish sending. 10.1.4 according the value of 0xfa which it read, the user can decided the time which he want to sent the data to trw - 900c, but use can t wait the value to 0, it will be wrong then. 10.1.5 if se nd the data again and it is still not finish sending, please repeat 10.1.13 and 10.1.14. b. when it is under receiving, please wait the dr line to high. if packet length is less then 61, please wait dr line lower and read more two bytes data. for those two mo re data, first one is rssi value, another is crc value. when crc value bit7 is 1, it is expresses packet is correct, otherwise, it is wrong. rssi value is with sign. if the value which it read is more big, it expresses receive single is better. *attention : 0 x ff is - 1 and it is less then 0. if packet length is over 60, the read method is as below: 10.1.6 wait dr line to be 1
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 9 10.1.7 if 0xfb value is 51, please read 50 byte data from trw - 900c. (51/50 can define by user, and please note the value of 0xfb just need under 1 .) 10.1.8 repeat 10.2.2. during it is reading 0xfb, if dr line become to low, it expresses data is less then 50 bytes. at this time, please withdraw from reading 0xfb status and read the rest data. 10.1.9 ( attention: read data are more then actual for two) 10.1.10 a f ter dr lin e become low, the way to know who many data is still need to read: 10.1.11 under constant packet status, value of 0x06 is 502 of n. 10.1.12 under variable packet status, the first read byte value is 50+2 of n. 11. power set +10 +8 +6 +4 +2 +0 - 2 - 4 - 6 - 8 - 10 - 12 - 15 - 52 300~400m hz c2 c8 ce 89 8d 3f 54 57 6b 35 34 33 1d 00 400~750m hz c0 c5 81 88 8d 3f 53 57 2a 35 34 33 1c 00 750~999m hz c3 c9 ce 87 8c 3f 54 57 2b 28 34 33 23 00 address of setting power is 0x7e plus 8 bytes data, please set those 8 bytes to the same and select power value. t he setting power of read is 0 xfe plus 8 bytes data, please check those 8 bytes are the same of setting. question and answer 1. q: power address of trw - 900c is any of 0x7e/7f/80/81/82/83/84/85 as deposit data? a: no, 0x7e address has 8 byte of data buffer ( please just think about this is ok.), not any of 0x7e/7f/80/81/82/83/84/85 . 2. q: miso will be equal to 0 when cs is equal to 0? a: yes, when cs is 0, miso will be to low. ( but prerequisite must be mc i had been put this pin as input, otherwise, it will be affected. ), and then put the data into module. application example 1 reset trw - 900c secondary program reset - trw - 900c 2 collocation trw - 900c secondary program config - trw - 900c 3 selection working mode transmit mode secondary program trw - 900c - txmode receive mode secondary program trw - 900c - rxmode available mode second ary program trw - 900c - tdlemode 4 data transfer sending data secondary program trw - 900c - send - data
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 10 receive data secondary program trw - 900c - receive - data 5 other mode set power secondary program trw - 900c - set - power low - power mode secondary program trw - 9 00c - lowpowermode /* ****************************************************************** /* company name wenshing electronic co., ltd. /* module name trw - 9 00c /* create person lhx date 2006 - 11 - 03 /* adjust person lhx date 2006 - 11 - 03 /* function descr iption h ow to use trw - 9 00c /* version ver1.00 /******************************************************************** #include < c8051f320.h > /******************************************************************** /****************************************** ************************** /* ****************************************************************** const unsigned char code trw - 9 00c_table[ 68 ]; /* ***************************************************************** sbit clk = p1 ^ 1 ; sbit miso = p1 ^ 2 ; sbit mosi = p1 ^ 3 ; sbit cs = p1 ^ 6 ; sbit dr = p1 ^ 4 ; sbit tx_led = p2 ^ 1 ; /******************************************************************** /* function name w - trw - 9 00c - byte */ /* function description write a byte data into trw - 900c */ /* input x */ /* b a ck n o */ /******************************************************************** void w - trw - 9 00c_byte( char x) { { unsigned char i; for (i = 0 ;i < 8 ;i ++ ) { clk = 0 ; mosi = 0 ; if (x & 0x80 ) mosi = 1 ; x <<= 1 ; clk = 1 ; } clk = 0 ;
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 11 } /******************************************************************** /* function name r - trw - 9 00c - byte */ /* function description read the data from trw - 900c */ /* input no */ /* back x */ /******************************************************************** char r - trw - 9 00c - byte( void ) { unsigned char i,x; for (i = 0 ;i < 8 ;i ++ ) { clk = 0 ; x <<= 1 ; x &= 0xfe ; if (miso) x |= 0x01 ; clk = 1 ; } clk = 0 ; return (x); } /********************************** ********************************** /* function name config - trw - 9 00c_ byte */ /* function description allocate byte to trw - 900c */ /* calling function w - trw - 9 00c - byte */ /* r - trw - 900c - byte */ /* function description when the seventh place of address is 1 please read */ /* use the value to see the input data is correct or not. /* input address */ /* back c_data */ /* function description collocate one byte to trw - 900c */ ***************************** ***************************************************************************** char config - trw - 900c - byt e( char address, char c_data) { cs = 0 ; while (miso); // d etermine whether low - level, or else wai t for a low after the withdrawa l w - trw - 900c - byte(address); if (address & 0x80 ) c_data = r - trw - 900c - byte(); else w - trw - 900c - byte(c_data); cs = 1 ; return (c_data);
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 12 } /* ******************************************************************* /* function name reset - trw - 900c */ /* function description rest trw - 900c */ /* calling function w - trw - 900c - byte */ /* input no */ /* back no */ /******************************************************************** void reset - trw - 900c( void ) { unsigned char i; cs = 1 ; for ( i = 0 ;i < 100 ;i ++ ); cs = 0 ; for (i = 0 ;i < 200 ;i ++ ); cs = 1 ; for (i = 0 ;i < 200 ;i ++ ); cs = 0 ; while (miso); // please determine miso is low level or not, or you can wait it become to low - level and r wait for a low after the withdrawa l w_trw - 900c_byte( 0x30 ); cs = 1 ; } /* ******************************************************************* /* function name trw - 900c - set - power */ /* function description set trw - 900c power */ /* calling function w - trw - 900c - byte */ /* function description write 8 byte data one time */ /* input x */ /* output no */ /************************************************************* ******* void trw - 900c_set_power( char x) { unsigned char i; cs = 0 ; while (miso); w_trw - 900c_byte( 0x7e ); for (i = 0 ;i < 8 ;i ++ ) w_trw - 900c_byte(x); cs = 1 ; } /******************************************************************** /* function name config_trw - 900c */
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 13 /* function collocation allocate trw - 900c */ /* calling function config_trw - 900c_ byte */ /* : w_trw - 900c_ byte */ /* input no */ /* output no */ /******************************************************************** void config_trw - 900c( void ) { unsigned c har i,x; do { for (i = 0 ;i < 68 ;) config_trw - 900c_byte(trw - 900c_table[i ++ ],trw - 900c_table[i ++ ]); trw - 900c_set_power( 0 xc3 ); // set the maximum transmit power cs = 0 ; while (miso); w_trw - 900c_byte( 0x33 ); cs = 1 ; cs = 0 ; while (miso); w_trw - 900c_byte( 0x37 ); cs = 1 ; for (i = 0 ;i < 200 ;i ++ ); i = config_trw - 900c_byte( 0x80 ,x); } while (i != 0x1b ); } /******************************************************************** ************************** /* function name trw - 900c_tx mode */ /* function description allocate trw - 900c working on transmitter mode */ /* function description this function will enable trw - 900c model or directly from the receiver cut back to idle mode when it is in transmit mode. */ /* calling f unction w_trw - 900c_ byte */ /* input no */ /* output no */ /******************************************************************** ************************** void trw - 900c_txmode( void ) { cs = 0 ; while (miso); w_trw - 900c_byte( 0x36 ); cs = 1 ; cs = 0 ; while (miso) ;
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 1 4 w_trw - 900c_byte( 0x3b ); cs = 1 ; cs = 0 ; while (miso); w_trw - 900c_byte( 0x35 ); cs = 1 ; } /******************************************************************** /* function name trw - 900c_rx mode */ /* function description allocate trw - 900c working on receive mode */ /* function descript ion this function will enable trw - 900c model or directly from the receiver cut back to idle mode when it is in transmit mode. */ /* calling function w_trw - 900c_byte */ /* input no */ /* back no */ /***************************** *************************************** void trw - 900c_rx mode( void ) { cs = 0 ; while (miso); w_trw - 900c_byte( 0x36 ); cs = 1 ; cs = 0 ; while (miso); w_trw - 900c_byte( 0x3a ); cs = 1 ; cs = 0 ; while (miso); w_trw - 900c_byte( 0x34 ); cs = 1 ; } /************************** ****************************************** /* function name trw - 900c_idle mode */ /* function description trw - 900c allocation of work in the idle mode */ /* function description this function can let trw - 900c transmit directly. */ ); model or receive mode cut back to idle mode; application do not want to receive, but requires quick return to transmit or receive stats. */ /* calling function w_trw - 900c_byte */ /* input no */ /* back no * / /******************************************************************** void trw - 900c_idle mode( void )
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 15 { cs = 0 ; while (miso); w_trw - 900c_byte( 0x36 ); cs = 1 ; } /******************************************************************** void send_fifo_pointer( void ) { unsigned char i; while (config_trw - 900c_byte( 0xfa , 0x00 ) > 0x10 ) for (i = 0 ;i < 200 ;i ++ ); } /******************************************** ************************ ****************************** /* function name trw - 900c_send_data */ /* function description: let trw - 900c send data/ */ /* function description fixed send data 88h.during sending process, please avoid one - time information for a number of byte 0x00,0 xff. otherwise, it will cause receive wrong or can t receive. */ /* calling function w_trw - 900c_byte */ /* input x is byte number of a packet sending . variable packet as an example, but a packet is less then 110 byte. */ /* back no */ /************************************************************************* ************************* void trw - 900c_send_data( unsigned char x) { unsigned char i; trw - 900c_txmode(); cs = 0 ; while (miso); w_trw - 900c_byte( 0x7f ); w_trw - 900c_byte(x); if (x < 65 ) { for (i = 0 ;i < x;i ++ ) w_trw - 900c_byte( 0x88 ); // sending 88h data cs = 1 ; } else { for (i = 0 ;i < 60 ;i ++ ) w_trw - 900c_byte( 0x88 ); // sending 88h data cs = 1 ;
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 16 while ( ! dr); send_fifo_pointer(); cs = 0 ; while (miso); w_trw - 900c_byte( 0x7f ); for (i = 0 ;i < (x - 60 );i ++ ) w_trw - 900c_byte( 0x88 ); // sending 88h data cs = 1 ; } while ( ! dr); // wait transmit finis h. after transmit finish, it will automatic into idle mode. if finish transmitted and want to be receive mode, please write trw - 900c_ rx mode() function. } /******************************************************************** /* function name receive_fifo_ pointer */ /* function description read receiving data index from trw - 900c. when it receive s the fifty - one data, please quit. */ /* calling function w_trw - 900c_byte */ /* input no */ /* back 0 , it expresses there are less then 50 bytes data and receive wi ll be finish. */ /* back 1 , it expresses that it had received 50 bytes data. */ /******************************************************************** unsigned char receive_fifo_pointer( void ) { unsigned char i = 0 ; while (config_trw - 900c_byte( 0xfb , 0x00 ) < 51 ) { tx_led = ~tx_led; for (i = 0 ;i < 200 ;i ++ ) if ( ! dr) i = 210 ; if (i == 211 ) break ; // please back while sentence . } if (i == 211 ) return ( 0 ); else return ( 1 ); } /******************************************************************** /* function name trw - 900c_receive_data */ /* function description let trw - 900c receive data. */ /* function description variable packet as an example . */ /* calling function w_trw - 900c_byte */ /* input no */
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 17 /* back 0 ,it expresses receive no data. */ /* back 1 , it expresses received data already. * / /* back 2 , it expresses received correct data. */ /******************************************************************* char trw - 900c_receive_data( void ) { unsigned char i = 0 , x = 0 ,y = 0 ,z,crc_value; unsigned char xdata rf_buffer[ 100 ],rf_pointer = 0 ; whil e (dr) { if (receive_fifo_pointer()) { x ++ ; cs = 0 ; while (miso); w_trw - 900c_byte( 0xff ); i = 0 ; if (x == 0 ) { rf_pointer = 0 ; y = r_trw - 900c_byte(); y ++ ; // when it is receiving data, it will have extra two more then actual transmitted. first is rssi, another is bit7 and value is crc. if crc is correct, ibt7 will be equal to 1, otherwise, it is equal to 0. rf_buffer[rf_pointer ++ ] = y - 1 ; } for (;i < 50 ;i ++ ) rf_buffer[rf_pointer ++ ] = r_trw - 900c_byte(); cs = 1 ; z = y - 50 ; } else { cs = 0 ; while (miso); w_trw - 900c_byte ( 0xff ); if (x == 0 ) { rf_pointer = 0 ; y = r_trw - 900c_byte(); y ++ ; rf_buffer[rf_pointer ++ ] = y - 1 ; for (i = 0 ;i < y;i ++ ) rf_buffer[rf_pointer ++ ] = r_trw - 900c_byte);i
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 18 } else { for (i = 0 ;i < z;i ++ ) rf_buffer[rf_pointer ++ ] = r_trw - 900c_byte(); } crc_value = r_trw - 900c_byt e(); rf_buffer[rf_pointer ++ ] = crc_value; cs = 1 ; z = 0x7f ; } } if (z == 0x7f ) { if (crc_value & 0x80 ) return ( 2 ); else return ( 1 ); } else return ( 0 ); } /******************************************************************** /* function name trw - 900c_low power mode */ /* function description let trw - 900c is under lower consumption status. */ /* calling function w_trw - 900c_byte */ /* input no */ /* back no */ /******************************************************************** void trw - 900c_lo w power mode( void ) { cs = 0 ; while (miso); w_trw - 900c_byte( 0x36 ); cs = 1 ; cs = 0 ; while (miso); w_trw - 900c_byte( 0x39 ); cs = 1 ; cs = 0 ; while (miso); w_trw - 900c_byte( 0x32 ); cs = 1 ; }
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 19 /******************************************************************* void ini t_mcu_status ( void ) { p1mdout = 0x4b ; p2mdout = 0x01 ; p1 = 0xf4 ; xbr1 = 0x40 ; oscicn |= 0x03 ; // frequency is 24m hz } /******************************************************************* /* function name main function */ /* mcu body c8051f32x */ /* input no */ /* back no */ /********************************************************************* void main( void ) { unsigned int x; unsigned char i; pca0md = 0x00 ; for (x = 0 ;x < 30000 ;x ++ ); init_mcu_status(); reset_t rw - 900c(); config_trw - 900c(); for (x = 0 ;x < 1000 ;x ++ ); while ( 1 ) { trw - 900c_send_data( 90 ); trw - 900c_rxmode(); for (x = 0 ;x < 60000 ;x ++ ) trw - 900c_receive_data(); } } const unsigned char code trw - 900c_table[ 68 ] = { 0x0d , 0x21 , // 1.2k 2 - fsk 868m 0x0e , 0x62 , 0x0f , 0x76 , 0 x0b , 0x08 , 0x0c , 0x00 , 0x10 , 0xf5 , 0x11 , 0x83 , 0x12 , 0x03 ,
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 20 0x13 , 0x43 , 0x14 , 0x3b , 0x0a , 0x00 , 0x15 , 0x15 , 0x22 , 0x10 , 0x21 , 0x56 , 0x18 , 0x08 , 0x19 , 0x16 , 0x1a , 0x6c , 0x1b , 0x03 , 0x1c , 0x40 , 0x1d , 0x91 , 0x23 , 0xa9 , 0x24 , 0x2a , 0x25 , 0x00 , 0x26 , 0x11 , 0x29 , 0x59 , 0x2c , 0x81 , 0x2d , 0x35 , 0x2e , 0x0b , 0x08 , 0x05 , 0x07 , 0x04 , 0x02 , 0x06 , 0x00 , 0x1b , 0x09 , 0x00 , 0x06 , 0xff /* 0x0d,0x21, ; 250k msk 868 0x0e,0x62, 0x0f,0x76, 0x0b,0x0b, 0x0c,0x00, 0x10,0x2d, 0x11,0x3b, 0x12,0x73, 0x13,0x43, 0x14,0x3b, 0x0a,0x00, 0x15,0x00, 0x22,0x10, 0x21,0xb6, 0 x18,0x08, 0x19,0x1d, 0x1a,0x1c, 0x1b,0xc7,
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 21 0x1c,0x00, 0x1d,0xb2, 0x23,0xea, 0x24,0x2a, 0x25,0x00, 0x26,0x11, 0x29,0x59, 0x2c,0x88, 0x2d,0x31, 0x2e,0x0b, 0x08,0x05, 0x07,0x04, 0x02,0x06, 0x00,0x06, 0x09,0x00, 0x06,0xff */ }; /* ************************************************************** ******************** */ // this program can be used for tws - 900c and trw - 900c and trw - 400 with the use of the reference program . /* ********************************************************** * ******************** *** */ void main (void) { delayms(200) init_mcu (); config_tws - 9 00 c (); while(1) { trw - 400_send_data (); } } /* ************************************************************ */ void write_word_trw - 400(char x,char y,char z) { unsigned cha r i; do { for(i=0;i<8;i++) { clk = 0; wr = 0;
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 22 if(y&0x80) wr = 1; clk = 1; y<<=1; } y=z; }while(x -- >0) } /* ************************************************************* */ void reset_trw - 400 (void) { unsigned char i; ce = 1; for(i=0;i<10;i++); ce = 0; for( i=0;i<10;i++); ce = 1; for(i=0;i<100;i++); ce = 0; while(rd); write_word_trw - 400(1,0x30,0x00); while(!rd); ce = 1; } /* ************************************************************** */ void config_tws - 9 00 c (void) { unsigned char i; reset_trw - 400 (); for(i= 0;i<50;) { ce = 0; while(rd); write_word_trw - 400(2,config_table[i++],config_table[i++]); ce = 1; } write_word_trw - 400 (9,0x7e,0xc3); // 0xc3 +10dbm input // 0xc6 + 9dbm input // 0xc9 + 8dbm input // 0xcc + 7dbm input // 0xce + 6dbm input // 0x86 + 5dbm in put // 0x89 + 4dbm input
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 23 // 0x8c + 3dbm input // 0x8d + 2dbm input // 0x3f + 0dbm input ce = 0; while(rd); write_word_trw - 400(1,0x37); ce = 1; delayms(1); ce = 0; while(rd); write_word_trw - 400(1,0x33); ce = 1; delayms(5); } /* ***************************** ******************************** */ void trw - 400_send_data(void) { ce = 0; while(rd); write_word_trw - 400(1,0x3b,0x00); ce = 1; delayms(1); ce = 0; while(rd); write_word_trw - 400(1,0x35,0x00); ce = 1; ce = 0; while(rd); write_word_trw - 400(14,0x7f,send_table[ i]); ce = 1; while(!flag); while(flag); delayms(1); } /* ************************************************************** */ unsigned char code send_table[] = { 0x12,0x34,0x56,0x78, 0x01,0x02,0x03,0x04, 0x05,0x06,0x07,0x5d,0x5d } /* ************************* ************************************* */ // allocation description // frequency 434m hz
http : //www.wenshing.com.tw ; http://www.rf.net.tw trw - 900c data s heet p. 24 // sending rate 4.8k // packet byte address number + data number+ crc number // 4+7+2 = 13 /* ************************************************************** */ unsigne d char code config_table[] = { 0x02,0x06, // 0x04,0x55, // 0x05,0x55, // 0x06,0x0e, // 14 0x08,0x00, // 0x0a,0x00, // 0x0d,0x10, // 0x0e,0xb1, // 0x0f,0x3b, // 0x10,0x87, // 0x11,0x83, // 0x12,0x03, // 0x13,0x02, // 0x14,0xf8, // 0x15,0x04, // 0x18,0x08, / / 0x22,0x10, // 0x23,0xa9, // 0x24,0x2a, // 0x25,0x00, // 0x26,0x11, // 0x29,0x59, // 0x2c,0x81, // 0x2d,0x35, // 0x2e,0x0b // }


▲Up To Search▲   

 
Price & Availability of TRW-900C

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X